package com.lzx.lizhenxing.user.service;

import com.lzx.lizhenxing.common.vo.PageVo;
import com.lzx.lizhenxing.user.model.UserOrderModel;
import com.lzx.lizhenxing.user.param.CreateOrderParam;
import com.lzx.lizhenxing.user.param.OrderQueryParam;
import com.lzx.lizhenxing.user.param.QueryOrderParam;
import com.lzx.lizhenxing.user.param.UpdateTimeParam;
import com.lzx.lizhenxing.user.vo.OrderPageVo;

/**
 * 用户订单表(UserOrder)表服务接口
 *
 */
public interface UserOrderService {
    /**
     * 创建业务订单
     * @param param
     * @return
     */
    Long createOrder(CreateOrderParam param);

    /**
     * 支付成功之后的订单处理
     * @param orderNo
     */
    void dealOrder(String orderNo);

    /**
     * 分页查询订单信息
     * @param param
     * @return
     */
    PageVo<OrderPageVo> getPageOrder(OrderQueryParam param);

    /**
     * 取消订单
     * @param id
     */
    void cancelOrder(Long id);

    /**
     * 修改对应订单的配送时间
     * @param param
     */
    void updateDeliveryTime(UpdateTimeParam param);

    /**
     * 仅仅删除已完成的订单的记录
     * @param id
     */
    void deleteOrderInfo(Long id);

    /**
     * 根据快递编码或者订单id获取订单
     * @param param
     * @return
     */
    UserOrderModel getOneOrder(QueryOrderParam param);

    /**
     * 使用积分支付
     * @param orderId
     */
    void payByPoint(Long orderId);

    /**
     * 根据快递id查找业务订单编码
     * @param orderId
     * @return
     */
    String getOrderNo(Long orderId);
}
